<template>
  <el-dialog
    v-model="show"
    title="批量添加VIP"
    width="30%"
    center
    :close-on-click-modal="false"
    :before-close="handleClose"
    draggable
  >
    <el-form :model="form">
      <el-form-item label="考试批次" :label-width="formLabelWidth">
        <el-select v-model="form.batchCode" placeholder="选择考试批次">
          <el-option label="Zone No.1" value="shanghai" />
          <el-option label="Zone No.2" value="beijing" />
        </el-select>
      </el-form-item>
      <el-form-item label="商品类型" :label-width="formLabelWidth">
        <el-select v-model="form.type" placeholder="选择商品类型">
          <el-option label="Zone No.1" value="shanghai" />
          <el-option label="Zone No.2" value="beijing" />
        </el-select>
      </el-form-item>
      <el-form-item label="考号" :label-width="formLabelWidth">
        <el-input v-model="form.examNo" type="textarea" />
      </el-form-item>
    </el-form>
    <template #footer>
      <span class="dialog-footer">
        <el-button type="primary" @click="handleConfirm"> 确 定 </el-button>
        <el-button @click="handleClose"> 取 消 </el-button>
      </span>
    </template>
  </el-dialog>
</template>

<script setup>
const show = inject('vipshow');

const form = reactive({
  name: '',
  region: '',
  date1: '',
  date2: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
});

const formLabelWidth = ref(150);
const handleClose = () => {
  show.value = false;
};
const handleConfirm = () => {
  show.value = false;
};
</script>

<style lang="scss" scoped>
.el-textarea {
  width: 300px;
}
</style>
